<template>
  <view class="content">
    <view
      class="box"
      v-for="(item, index) in list"
      :key="index"
      @click="asd(item.lottery_id)"
    >
      <img src="../../static/images/pl3.png" alt="" srcset="" />
      <view class="box1">
        <span class="text">{{ item.lottery_name }}</span
        ><br />
        <span>{{ item.remarks }}</span>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      list: [],
    };
  },
  onLoad() {},
  created() {},
  mounted() {
    uni.request({
      url: "http://api.aslegou.top/api/cptypelist",
      method: "get",
      success: (res) => {
        // console.log(res);
        this.list = res.data.list;
        console.log(this.list);
      },
    });
  },
  methods: {
    asd(id) {
		console.log(id);
      uni.navigateTo({ url: "/pages/list/index" });
				uni.setStorageSync('id',i)
    },
  },
};
</script>

<style>
.content {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  /* justify-content: center; */
  background-color: #c46d6d;
}

img {
  width: 30px;
  height: 80%;
  margin-top: 10px;
  margin-left: 10px;
}
.box {
  display: flex;
  width: 90%;
  height: 80px;
  background-color: white;
  margin-top: 20px;
  border-radius: 20px;
}
.text {
  font-weight: 700;
}
.box1 {
  margin-top: 20px;
}
</style>
